Living body detection method, apparatus and device

ABSTRACT

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for liveness detection are provided. One of methods includes: displaying an image to a user, and capturing a face image of the user while displaying the image to the user; determining an eye image of an eye of the user based on the face image; extracting a to-be-verified image from the eye image of the user, wherein the to-be-verified image is reflection of the displayed image in the eye of the user; comparing the displayed image with the to-be-verified image to determine whether the to-be-verified image matches the displayed image; and performing liveness detection on the user based on a result of comparison.

CROSS REFERENCE TO RELATED APPLICATION

The present application is a continuation application of InternationalPatent Application No. PCT/CN2019/073576, filed on Jan. 29, 2019, andentitled “LIVING BODY DETECTION METHOD, APPARATUS AND DEVICE,” whichclaims priority to and is based on the Chinese Patent Application No.201810159297.4, filed on Feb. 26, 2018. All of the above-referencedapplications are incorporated herein by reference in their entirety.

TECHNICAL FIELD

The application relates to the field of computer technologies, and inparticular, to a liveness detection method, apparatus, and device.

BACKGROUND

At present, biometric recognition manners such as facial recognition,voice recognition, and fingerprint recognition are gradually beingapplied to identity authentication in various scenarios. Compared with atraditional identity authentication manner such as passwordauthentication, these authentication manners can authenticate andrecognize a user with higher accuracy, thus further strengthening userinformation security.

Liveness detection is of particular importance during a facialrecognition process. Detecting whether a face is a genuine face ratherthan a falsified face image such as a picture of a face is usuallyachieved by using a liveness detection technology, so as to effectivelyprevent people from using falsified faces to spoof facial recognition.However, the current liveness detection manners may bring discomfort tousers during the facial recognition process.

Based on the current technologies, a more effective liveness detectionmanner is desirable.

SUMMARY

The application provides a liveness detection method, apparatus, anddevice for resolving the problem in the current technologies that theliveness detection brings discomfort to users.

The application provides a liveness detection method, comprising:displaying an image to a user, and capturing a face image of the userwhile displaying the image to the user; determining an eye image of aneye of the user based on the face image; extracting a to-be-verifiedimage from the eye image of the user, wherein the to-be-verified imageis reflection of the displayed image in the eye of the user; comparingthe displayed image with the to-be-verified image to determine whetherthe to-be-verified image matches the displayed image; and performingliveness detection on the user based on a result of comparison.

In some embodiments, determining an eye image of the user based on theface image comprises: determining whether the face image contains theuser's face or reaches a clarity; and in response to determining thatthe face image contains the user's face or reaches the clarity,extracting the eye image of the user from the face image.

In some embodiments, the displayed image comprises a first character,and the to-be-verified image comprises a second character; and comparingthe displayed image with the to-be-verified image to determine whetherthe to-be-verified image matches the displayed image comprises:comparing characteristic information in the displayed image andcharacteristic information in the to-be-verified image to determinewhether the characteristic information in the to-be-verified imagematches the characteristic information in the displayed image, whereinthe characteristic information in the displayed image comprises a size,a color, a location of the first character in the displayed image, or acombination thereof, and the characteristic information in theto-be-verified image comprises a size, a color, a location of the secondcharacter in the to-be-verified image, or a combination thereof.

In some embodiments, the displayed image comprises a first pattern, andthe to-be-verified image comprises a second pattern; and comparing thedisplayed image with the to-be-verified image to determine whether theto-be-verified image matches the displayed image comprises: comparingcharacteristic information in the displayed image and characteristicinformation in the to-be-verified image to determine whether thecharacteristic information in the to-be-verified image matches thecharacteristic information in the displayed image, wherein thecharacteristic information in the displayed image comprises a shape, asize, a color, a location of the first pattern in the displayed image,or a combination thereof, and the characteristic information in theto-be-verified image comprises a shape, a size, a color, a location ofthe second pattern in the to-be-verified image, or a combinationthereof.

In some embodiments, displaying an image to a user comprises:sequentially displaying a plurality of images in a specified orderwithin a time.

In some embodiments, capturing a face image of the user while displayingthe image to the user comprises: continuously capturing a plurality offace images of the user at least within the time. In some embodiments,determining an eye image of the user based on the face image comprises:for each of the plurality of continuously captured face images,determining an eye image of the user based on the respective face image.

In some embodiments, performing liveness detection on the user based ona result of comparison comprises: determining, from the plurality ofdisplayed images, a quantity of matching images each matching ato-be-verified image included in at least one eye image of the user; andperforming liveness detection based on the quantity of the matchingimages.

In some embodiments, performing liveness detection on the user based ona result of comparison comprises: determining, from the plurality ofcontinuously captured face images, a quantity of matching face imagesfor each of which a to-be-verified image included in the correspondingeye image of the user matches at least one displayed image; andperforming liveness detection based on the quantity of the matching faceimages.

The application provides a liveness detection apparatus, comprising: oneor more processors and one or more non-transitory computer-readablememories coupled to the one or more processors and configured withinstructions executable by the one or more processors to cause theapparatus to perform operations comprising: displaying an image to auser, and capturing a face image of the user while displaying the imageto the user; determining an eye image of an eye of the user based on theface image; extracting a to-be-verified image from the eye image of theuser, wherein the to-be-verified image is reflection of the displayedimage in the eye of the user; comparing the displayed image with theto-be-verified image to determine whether the to-be-verified imagematches the displayed image; and performing liveness detection on theuser based on a result of comparison.

The application provides a non-transitory computer-readable storagemedium configured with instructions executable by one or more processorsto cause the one or more processors to perform operations comprising:displaying an image to a user, and capturing a face image of the userwhile displaying the image to the user; determining an eye image of aneye of the user based on the face image; extracting a to-be-verifiedimage from the eye image of the user, wherein the to-be-verified imageis reflection of the displayed image in the eye of the user; comparingthe displayed image with the to-be-verified image to determine whetherthe to-be-verified image matches the displayed image; and performingliveness detection on the user based on a result of comparison.

At least one of the above-described embodiments in the application canachieve the following beneficial effects: in one or more embodiments ofthe application, after a preset image is displayed to a user, a faceimage of the user may be captured, and a to-be-verified image includedin an image of an eye of the user (also referred to as an eye image ofthe user) may be determined from the face image, so that livenessdetection may be performed on the user based on the preset image and theto-be-verified image. In other words, the image reflected in the user'seyeball may be captured due to the high reflectivity feature of theeyeball; the captured reflection image is then matched with thedisplayed image, so as to perform liveness detection on the user. Inthis way, natural liveness detection may be performed on the user byusing characteristics of a human body when the user looks at the presetimage without feeling the detection, thereby bringing great convenienceto the user.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings described herein are intended to facilitatefurther understanding of the application, and constitute a part of theapplication. The illustrative embodiments of the application and thedescriptions thereof are used to explain the application, and are notintended to constitute an improper limitation on the application. In theaccompanying drawings:

FIG. 1 is a schematic diagram of a liveness detection process accordingto some embodiments of the application;

FIG. 2 is a schematic diagram of a terminal device performing livenessdetection on a user by comparing a to-be-verified image with a presetimage according to some embodiments of the application;

FIG. 3 is a schematic diagram of a terminal device performing livenessdetection on a user by using a plurality of displayed preset images anda plurality of captured face images according to some embodiments of theapplication;

FIG. 4 is a schematic diagram of a liveness detection apparatusaccording to some embodiments of the application; and

FIG. 5 is a schematic diagram of a liveness detection device accordingto some embodiments of the application.

DETAILED DESCRIPTION

To ensure information security of a user, a terminal device may performidentity authentication on the user when the user makes a transaction.If the terminal device performs identity authentication on the user byusing facial recognition, liveness detection is to be performed on ancaptured face image when facial recognition is being performed on theuser.

In the current technologies, the terminal device may shine light ofdifferent colors and intensities on the user's face by virtue of ascreen, so as to perform liveness detection by capturing light reflectedby the face. Although such a manner may detect to some extent whether acurrent face image is a face image of a living body, the terminal deviceis required to shine relatively strong light onto the user's face sothat the light reflected by the face may be captured. The relativelystrong light used in this method brings discomfort to the user.Additionally, such a manner relies heavily on the surroundingenvironment in that if relatively strong ambient light is present in theuser's environment, the terminal device will not be able to effectivelycapture the light reflected by the face, and thus cannot performliveness detection on the user.

To resolve the above-described problem, in the application, the terminaldevice may display a preset image and capture a face image of the userlooking at the preset image. The terminal device may determine, from theface image, a to-be-verified image included in an eye image of the user,so that liveness detection may be performed on the user based on thepreset image and the to-be-verified image.

Since human eyes can reflect light very easily, the terminal device isnot required to display, by means of a screen, to the user an image withrelatively strong light. Instead, the terminal device may capture theto-be-verified image formed by reflection in the user's eyeball. Bymatching the to-be-verified image with the displayed preset image, theterminal device may perform natural liveness detection on the user whilethe user is not feeling the detection, which brings great convenience tothe user.

To enable those skilled in the art to better understand the one or moreembodiments of the application, the one or more embodiments of theapplication will be clearly described below in combination with theaccompanying drawings of the one or more embodiments of the application.The embodiments described below are merely a part, but not all, of theembodiments of the application. All of other embodiments, obtained bythose of ordinary skill in the art based on the embodiments of theapplication without any creative efforts, fall into the protection scopeof the application.

FIG. 1 is a schematic diagram of a liveness detection process accordingto some embodiments of the application. The process comprises thefollowing steps:

S100: displaying a preset image to a user, and capturing a face image ofthe user while displaying the preset image to the user.

When performing liveness detection on a user, a terminal device maydisplay a preset image to the user. The preset image may be a defaultfixed image, or may be an image different from those used for previousliveness detection. In other words, during each liveness detection, theterminal device may display to the user the same preset image or adifferent preset image.

In some embodiments, the preset image may include information in acharacter form, such as a number or a word, or may include informationin a pattern form. A size, shape, color, location, and the like of suchinformation in the preset image may constitute characteristicinformation of the preset image. Since different preset images comprisedifferent characters and patterns, and the characters and patterns inthe preset images have different sizes, shapes, colors and the like,different characteristic information may be used to effectively identifydifferent preset images. As a result, the terminal device maysubsequently perform liveness detection on the user based on thecharacteristic information of the preset image. The terminal devicedescribed herein may be a device such as a smart phone, a tabletcomputer, or a notebook computer capable of performing livenessdetection on the user.

After displaying the preset image to the user, the terminal device maycapture, by using a preset image acquisition apparatus (such as acamera), a face image of the user looking at the preset image.

S102: determining an eye image of the user based on the face image.

In some embodiments, after capturing the face image of the user lookingat the preset image, the terminal device may recognize, from the faceimage, a to-be-verified image formed by reflection in the user'seyeball, and then perform liveness detection on the user based on theto-be-verified image and the preset image in a subsequent process.

In some embodiments, after capturing the face image of the user, theterminal device may first determine whether the captured face imagemeets a preset condition by using a preset recognition manner; and afterdetermining that the face image meets the preset condition, the terminaldevice may further determine, from the face image, an eye image of theuser's eye in the face image as an eye image corresponding to the faceimage; and then the terminal device may extract the to-be-verified imagefrom the eye image.

The preset condition described herein may be in different forms. Forexample, when it is determined that the image captured when the userlooks at the preset image contains the user's face, it is determinedthat the face image meets the preset condition. In another example, whenit is determined that the captured face image has a sharpness or claritythat reaches a set sharpness or clarity, it is determined that the faceimage meets the preset condition.

S104: performing liveness detection on the user based on the presetimage and the to-be-verified image included in the eye image.

After determining the to-be-verified image from the captured face image,the terminal device may compare the captured to-be-verified image withthe preset image that the terminal device has displayed to the user, andperform liveness detection on the user based on an obtained comparisonresult. For example, if the to-be-verified image is an image reflectedin the user's eyeball when the user looks at the preset image, thecontent included in the two images should be the same. Based on this,the terminal device may compare characters and/or patterns comprised inthe two images, or compare characteristic information including theshapes, sizes, colors, locations, and the like of the characters and/orpatterns in the two images, or a combination thereof, so as to determinewhether the two images are the same. For example, if the characteristicinformation of the characters in the two images are matched (e.g., thesame or similar to some extent), then the two images are determined tobe the same. In another example, if the characteristic information ofthe characters in the two images are matched (e.g., the same or similarto some extent), then the two images are determined to be the same. Instill another example, if the characteristic information of thecharacters and the patterns are determined to be matched (e.g., the sameor similar to some extent), then the two images are determined to be thesame. If the two images are the same, it is determined that thecurrently captured face image is a face image of a living body; if thetwo images are different, it is determined that the face image is a faceimage of a non-living body. These may be shown in FIG. 2.

FIG. 2 is a schematic diagram of a terminal device performing livenessdetection on a user by comparing a to-be-verified image with a presetimage according to some embodiments of the application.

The terminal device may display to the user the preset image as shown inFIG. 2, and capture a face image of the user looking at the presetimage. Then the terminal device may determine an eye image of the user'seye from the face image, so as to extract, from the eye image, ato-be-verified image reflected in the eyeball.

The to-be-verified image captured by the terminal device is a mirrorimage of the preset image. Therefore, the terminal device mayhorizontally flip the to-be-verified image, and then compare the flippedto-be-verified image with the preset image, so as to perform livenessdetection on the user.

As shown in FIG. 2, the preset image contains two five-pointes stars.The sizes and locations of the two five-pointed stars in the presetimage are the same as those of the two five-pointed stars included inthe flipped to-be-verified image. Therefore, it may be determined thatthe to-be-verified image matches the preset image, and it may be furtherdetermined that the face image currently captured by the terminal deviceis a face image of a living body.

During liveness detection, the terminal device may display a staticpreset image to the user, or may display dynamically changing presetimages to the user, i.e., display a plurality of preset images.Therefore, in the some embodiments, the terminal device may sequentiallydisplay a plurality of preset images in a specified order within apreset time, and may continuously capture face images of the userlooking at the plurality of displayed preset images at least within thepreset time.

For example, the terminal device may periodically display the presetimages that change in a specified order in every three seconds. Then theterminal device may continuously capture a plurality of face images ofthe user looking at the continuously changed preset images, extract aplurality of to-be-verified images from the face images, and thencompare the plurality of to-be-verified images with the plurality ofpreset images displayed by the terminal device, so as to performliveness detection on the user, which is shown in FIG. 3.

FIG. 3 is a schematic diagram of a terminal device performing livenessdetection on a user by using a plurality of displayed preset images anda plurality of captured face images according to some embodiments of theapplication.

During liveness detection, the terminal device may, for example withinthree seconds, display three preset images to the user in a specifiedorder, and capture face images of the user looking at the three presetimages within the three seconds. Then the terminal device may extract,from the captured face images, to-be-verified images reflected in theuser's eyeball. Since the to-be-verified images captured by the terminaldevice are mirror images of the preset images respectively, the terminaldevice may horizontally flip the determined to-be-verified images toobtain all flipped to-be-verified images; and then each of the flippedto-be-verified images is compared with the respective preset imagedisplayed by the terminal device.

When it is determined that each of the flipped to-be-verified imagesmatches the respective preset images displayed by the terminal device,it may be determined that the face images currently captured by theterminal device are face images of a living body.

In some embodiments, the terminal device may compare a plurality ofcaptured face images with a plurality of displayed preset images,determine matching preset images from the plurality of preset images,and then perform liveness detection on the user based on the quantity ofthe preset images. The matching preset image described herein may be apreset image matching at least one to-be-verified image.

For example, assuming that the terminal device determines a plurality ofto-be-verified images from a plurality of captured face images, andcompares the plurality of to-be-verified images with a quantity of(e.g., represented by letter S) displayed preset images. It is foundthrough comparison that the quantity of the matching preset images,among the plurality of preset images, that match the to-be-verifiedimages is represented by letter A. Therefore, a ratio of the quantity Aof the matching preset images to the total quantity S of displayedpreset images may be determined. The terminal device may furtherdetermine whether the ratio reaches a set ratio; and if it is determinedthat the ratio reaches the set ratio, the terminal device may determinethat the captured face image is a face image of a living body; if it isdetermined that the ratio does not reach the set ratio, the terminaldevice may determine that the captured face image is a face image of anon-living body.

The terminal device may further compare a plurality of captured faceimages with a plurality of displayed preset images, determine matchingface images from the plurality of captured preset images, and thenperform liveness detection on the user based on the quantity of thematching face images. The matching face image described herein is a faceimage matching at least one preset image displayed by the terminaldevice. For details, reference may be made to the above-describedexamples, which are not repeated herein.

In some embodiments, there may be many other manners in which theterminal device performs liveness detection on the user based on thedetermined to-be-verified images and the displayed preset images, whichwill not be illustrated herein one by one.

In the above-described embodiments, since human eyes can reflect lightvery easily, the terminal device is not required to display, by means ofa screen, to the user an image with relatively strong light. Instead,the terminal device may capture the to-be-verified image reflected inthe user's eyeball. By matching the to-be-verified image with thedisplayed preset image, the terminal device may perform natural livenessdetection on the user while the user is not feeling the detection, whichbrings great convenience to the user.

In the application, after capturing the face image, the terminal devicemay first determine whether the captured image of the user is an imageof a genuine face by using a preset recognition manner. Afterdetermining that the captured image is an image of a genuine face, theterminal device may further capture a current eye image of the user byusing an image acquisition apparatus, and then extract, from thecaptured eye image, a to-be-verified image reflected in the user'seyeball.

The liveness detection method according to the one or more embodimentsof the application is described above. Based on the same concept, theapplication further provides a liveness detection apparatus, as shown inFIG. 4.

FIG. 4 is a schematic diagram of a liveness detection apparatusaccording to some embodiments of the application. The apparatuscomprises: a display module 401, configured to display a preset image toa user, and capture a face image of the user; a determination module402, configured to determine an eye image of the user based on the faceimage; and a detection module 403, configured to perform livenessdetection on the user based on the preset image and a to-be-verifiedimage included in the eye image.

In some embodiments, the determination module 402 is configured todetermine whether the face image meets a preset condition; if it isdetermined that the face image meets the preset condition, extract theeye image of the user from the face image.

The preset image comprises a character and/or a pattern, and theto-be-verified image comprises a character and/or a pattern; and thedetection module 403 is configured to perform liveness detection on theuser based on characteristic information in the preset image andcharacteristic information in the to-be-verified image, wherein if thepreset image or the to-be-verified image comprises a character, thecharacteristic information comprises at least one of a size, color, andlocation of the character in the preset image or the to-be-verifiedimage; if the preset image or the to-be-verified image comprises apattern, the characteristic information comprises at least one of ashape, size, color, and location of the pattern in the preset image orthe to-be-verified image.

In some embodiments, the to-be-verified image is reflection of thepreset image in the user's eye; and the detection module 403 isconfigured to compare the preset image with the to-be-verified image,and perform liveness detection on the user based on an obtainedcomparison result.

In some embodiments, the display module 401 is configured tosequentially display a plurality of preset images in a specified orderwithin a preset time; and the display module 401 is further configuredto continuously capture face images of the user at least within thepreset time.

In some embodiments, the determination module 402 is configured to: foreach of the continuously captured face images, determine an eye image ofthe user based on the face image as an eye image corresponding to theface image; and the detection module 403 is configured to determinematching preset images from a plurality of displayed preset images, andperform liveness detection on the user based on the quantity of thematching preset images; and/or determine matching face images from thecontinuously captured face images, and perform liveness detection on theuser based on the quantity of the matching face images, wherein each ofthe matching preset images is a preset image matching a to-be-verifiedimage included in the eye image corresponding to at least one faceimage; and each of the matching face images is a face image for which ato-be-verified image included in the corresponding eye image matches atleast one preset image.

The various modules of the liveness detection apparatus in FIG. 4 may beimplemented as software instructions. That is, the apparatus in FIG. 4may comprise a processor and a non-transitory computer-readable storagemedium storing instructions that, when executed by the processor, causeone or more components of the apparatus (e.g., the processor) to performvarious steps and methods of the modules described above.

Based on the above-described liveness detection method embodiments,accordingly, the application further provides a liveness detectiondevice, as shown in FIG. 5. The device comprises one or more memoriesand processors, wherein the memory storing a program configured to causethe one or more processors to execute the following steps: displaying apreset image to a user, and capturing a face image of the user;determining an eye image of the user based on the face image; andperforming liveness detection on the user based on the preset image anda to-be-verified image included in the eye image.

In one or more embodiments of the application, after a preset image isdisplayed to a user, a face image of the user may be captured; and ato-be-verified image included in an eye image of the user may bedetermined from the face image, so that liveness detection can beperformed on the user based on the preset image and the to-be-verifiedimage.

The image reflected in the user's eyeball may be captured due to thehigh reflectivity feature of the eyeball; the captured reflection imageis matched with the displayed image, so as to perform liveness detectionon the user. In this way, natural liveness detection may be performed onthe user by using characteristics of a human body when the user looks atthe preset image without feeling the detection, thereby bringing greatconvenience to the user.

In the 1990s, an improvement in technology can be clearly identified asa hardware improvement (for example, an improvement in a diode, atransistor, a switch, and other circuit structures), or a softwareimprovement (for example, an improvement in a method flow). However,with the development of various technologies, an improvement in manymethod flows nowadays can be considered as a direct improvement in ahardware circuit structure. Most of design engineers obtain acorresponding hardware circuit structure by programming an improvedmethod flow into a hardware circuit. Therefore, one cannot make thestatement that an improvement in a method flow cannot be implemented ina physical hardware module. For example, a programmable logic device(PLD) (for example, a field programmable gate array, FPGA) is such anintegrated circuit that the logic functions thereof are determined byprogramming the device by users. Design engineers can program and“integrate” a digital system in a PLD without having a manufacturer todesign and manufacture a dedicated integrated circuit chip. Moreover, atpresent, instead of manually manufacturing an integrated circuit chip,the programming in most cases is achieved by using “logic compiler”software. The logic compiler is similar to a software compiler used fordeveloping and compiling a program; and before compilation, the rawcodes may also need to be complied in some programming language, whichis called hardware description language (HDL); furthermore, there aremany types rather than only one type of HDL, such as Advanced BooleanExpression Language (ABEL), Altera Hardware Description Language (AHDL),Confluence, Cornell University Programming Language (CUPL), HDCal, JavaHardware Description Language (JHDL), Lava, Lola, MyHDL, PALASM, RubyHardware Description Language (RHDL), and the like, among which VHDL(Very-High-Speed Integrated Circuit Hardware Description Language) andVerilog are most commonly used at present. Those skilled in the artshould understand that simply by performing logic programming on amethod flow by using the above-described hardware description languagesand by programming the method flow into an integrated circuit, ahardware circuit for implementing the logic method flow can be obtainedeasily.

A controller can be implemented in any appropriate form; for example,the controller can be in the form of a microprocessor or a processor, acomputer-readable medium storing a computer-readable program code (forexample, software or hardware) which can be executed by themicroprocessor/processor, a logic gate, a switch, an applicationspecific integrated circuit (ASIC), a programmable logic controller, andan embedded micro-controller; the examples of controllers include, butare not limited to, the following micro-controllers: ARC 625D, AtmelAT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. A memorycontroller can also be implemented as a part of a memory control logic.Those skilled in the art should appreciate that besides the controllerbeing implemented by using only computer-readable program codes, it iscompletely acceptable to perform logic programming on method steps toenable the controller to realize the same functions in the form of alogic gate, a switch, a dedicated integrated circuit, a programmablelogic controller, and an embedded micro-controller. Therefore, thecontroller can be considered as a hardware component; and an apparatusfor implementing various functions included in the controller can alsobe considered as a structure in the hardware component. Alternatively,an apparatus for implementing various functions can be even consideredas both a software module for implementing a method and a structure inthe hardware component.

Systems, apparatus, modules, or units described in the above-describedembodiments may be implemented by computer chips or entities, or byproducts with some function. A typical implementation device is acomputer. For example, the computer, can be a personal computer, alaptop computer, a cellular phone, a camera phone, a smart phone, apersonal digital assistant, a media player, a navigation device, ane-mail device, a game console, a tablet computer, a wearable device, ora combination of any of these devices.

For ease of description, the above apparatus are described on the basisof respective function of each unit thereof. Naturally, when theapplication is implemented, the functions of the units can beimplemented in the same one or more software and/or hardware.

Those skilled in the art should appreciate that the embodiments of theapplication can be embodied as a method, a system, or a computer programproduct. Therefore, the present application can take the form of anentire hardware embodiment, an entire software embodiment or anembodiment combining hardware and software elements. Furthermore, theapplication can take the form of a computer program product embodied inone or more computer usable storage media including computer usableprogram codes (including, but not limited to, a magnetic disk storage, aCD-ROM, an optical memory, and the like).

The application is described with reference to the flow charts and/orblock diagrams of the method, device (system), and computer programproduct according to the one or more embodiments of the application. Itshould be understood that each flow and/or block in the flow chartsand/or the block diagrams, and a combination of the flows and/or theblocks in the flow charts and/or the block diagrams can be implementedvia computer program instructions. The computer program instructions maybe loaded onto a general-purpose computer, a specialized computer, anembedded processor, or a processor of any other programmable dataprocessing device to produce a computer such that the instructions whichare executed on the computer or the processor of any other programmabledata processing device generate an apparatus for implementing thefunctions specified in one or more flows in a flow chart and/or one ormore blocks in a block diagram.

The computer program instructions can also be stored in a computerreadable memory which can boot a computer or other programmable dataprocessing devices to operate in a specific manner, such that theinstructions stored in the computer readable memory generate a productcomprising an instruction apparatus, wherein the instruction apparatusis configured to implement the functions specified in one or more flowsin a flow chart and/or one or more blocks in a block diagram.

The computer program instructions can also be loaded to a computer orother programmable data processing devices, so as to perform a series ofoperation steps on the computer or the other programmable devices togenerate a computer-implemented process, such that the instructionsexecuted on the computer or the other programmable devices can providesteps for implementing the functions specified in one or more flows in aflow chart and/or one or more blocks in a block diagram.

In a typical configuration, a computing device comprises one or moreprocessors (CPU), an input/output interface, a network interface, and aninternal memory.

The internal memory may comprise a volatile memory on a computerreadable medium, a random access memory (RAM), a non-volatile memory,and/or a non-volatile memory, such as a read-only memory (ROM) or aflash random access memory (flash RAM). The internal memory is anexample of the computer readable medium.

The computer readable medium includes non-volatile, volatile, removable,and non-removable media which can store information by using any methodsor technologies. The information can be a computer-readable instruction,a data structure, a program module, or other data. Examples of thecomputer storage medium include, but are not limited to, a phase-changerandom access memory (PRAM), a static random access memory (SRAM), adynamic random access memory (DRAM), other types of random accessmemories (RAM), a read-only memory (ROM), an electrically erasableprogrammable read-only memory (EEPROM), a flash memory or other memorytechnologies, a compact disc read-only memory (CD-ROM), a digitalversatile disc (DVD) or other optical memories, a cassette tape, and amagnetic tape disk storage, other magnetic storage devices or any othernon-transmitting media, which can be used to store information that canbe accessed by the computing device. As described herein, thecomputer-readable media do not include transitory computer-readablemedia (transitory media), such as modulated data signals and carriers.

It should also be noted that the terms “comprising,” “including” or anyother variants thereof are intended to cover non-exclusive inclusion,such that a process, method, a product, or device comprising a series ofelements comprises not only those elements but also other elements notexplicitly listed, or further comprises inherent elements of suchprocess, method, product or device. Unless more limitations are stated,the element defined by the sentence “comprising a . . . ” does notexclude the situation that the process, method, commodity, or devicecomprising the element further comprises another same element.

The application can be described in a general context of a computerexecutable instruction executed by a computer, for example, a programmodule. Generally, the program module comprises a routine, a program, anobject, an assembly, a data structure, and the like for executing a taskor for implementing an abstract data type. The one or more embodimentsof the application can also be implemented in a distributed computingenvironment where a task is executed by a remote processing deviceconnected via a communication network. In the distributed computingenvironment, the program module can be located in a local and a remotecomputer storage media comprising a storage device.

The embodiments of the application are all described in a progressivemanner. The same or similar parts in the embodiments may be mutuallyreferenced. Each embodiment emphasizes content different from that inother embodiments. Particularly, the system embodiments are basicallysimilar to the method embodiments, and are thus described in a moreconcise manner. For relevant content, reference may be made to thecontent in the method embodiments.

The embodiments of the application are described above. Otherembodiments fall within the scope of the attached claims. In somesituations, actions or steps stated in the claims may be performed in asequence different from those in the embodiments and the desired resultscan still be achieved. In addition, the desired results can still beachieved if the processes described in the drawings are not necessarilyperformed in the illustrated particular or continuous sequence. In someimplementation manners, multitasking and parallel processing are alsofeasible or may be advantageous.

Although one or more embodiments of the application are described above,they shall not be construed as limiting the application. For thoseskilled in the art, one or more embodiments of the application may havevarious modifications and variations. Any modification, equivalentreplacement, or improvement made within the spirit and principle of theone or more embodiments of the application shall fall within theprotection scope of the claims of the application.

The invention claimed is:
 1. A liveness detection method, comprising:sequentially displaying a plurality of images to a user; capturing aplurality of face images of the user while displaying the plurality ofimages to the user; for each of the captured face images: determining aneye image of an eye of the user based on the face image, extracting ato-be-verified image from the eye image of the user, wherein theto-be-verified image is a reflection of a corresponding one of thedisplayed images in the eye of the user, and comparing the correspondingdisplayed image with the to-be-verified image to determine whether theto-be-verified image matches the corresponding displayed image;determining a quantity of matches between the to-be-verified images andthe corresponding displayed images; and performing liveness detection onthe user based on the quantity of matches.
 2. The method according toclaim 1, wherein determining the eye image of the user based on the faceimage comprises: determining whether the face image contains the user'sface or reaches a clarity; and in response to determining that the faceimage contains the user's face or reaches the clarity, extracting theeye image of the user from the face image.
 3. The method according toclaim 1, wherein each displayed image comprises a first character, andeach to-be-verified image comprises a second character; and comparingthe corresponding displayed image with the to-be-verified image todetermine whether the to-be-verified image matches the displayed imagecomprises: comparing characteristic information in the correspondingdisplayed image and characteristic information in the to-be-verifiedimage to determine whether the characteristic information in theto-be-verified image matches the characteristic information in thecorresponding displayed image, wherein the characteristic information inthe corresponding displayed image comprises a size of the firstcharacter, a color of the first character, or a location of the firstcharacter, and the characteristic information in the to-be-verifiedimage comprises a size of the second character, a color of the secondcharacter, or a location of the second character.
 4. The methodaccording to claim 1, wherein each displayed image comprises a firstpattern, and each to-be-verified image comprises a second pattern; andcomparing the corresponding displayed image with the to-be-verifiedimage to determine whether the to-be-verified image matches thedisplayed image comprises: comparing characteristic information in thecorresponding displayed image and characteristic information in theto-be-verified image to determine whether the characteristic informationin the to-be-verified image matches the characteristic information inthe corresponding displayed image, wherein the characteristicinformation in the corresponding displayed image comprises a shape ofthe first pattern, a size of the first pattern, a color of the firstpattern, or a location of the first pattern, and the characteristicinformation in the to-be-verified image comprises a shape of the secondpattern, a size of the second pattern, a color of the second pattern, ora location of the second pattern.
 5. The method according to claim 1,wherein sequentially displaying the plurality of images to a usercomprises: sequentially displaying the plurality of images in aspecified order within a time.
 6. The method according to claim 5,wherein capturing the plurality of face images of the user whiledisplaying the plurality of images to the user comprises: continuouslycapturing the plurality of face images of the user within the time. 7.The apparatus according to claim 1, wherein each displayed imagecomprises a first character, and each to-be-verified image comprises asecond character; and comparing the corresponding displayed image withthe to-be-verified image to determine whether the to-be-verified imagematches the corresponding displayed image comprises: comparingcharacteristic information in the corresponding displayed image andcharacteristic information in the to-be-verified image to determinewhether the characteristic information in the to-be-verified imagematches the characteristic information in the corresponding displayedimage, wherein the characteristic information in the displayed imagecomprises a size of the first character, a color of the first character,or a location of the first character, and the characteristic informationin the to-be-verified image comprises a size of the second character, acolor of the second character, or a location of the second character. 8.A liveness detection apparatus comprising: one or more processors andone or more non-transitory computer-readable memories coupled to the oneor more processors and configured with instructions executable by theone or more processors to cause the apparatus to perform operationscomprising: sequentially displaying a plurality of images to a user;capturing a plurality of face images of the user while displaying theplurality of images to the user; for each of the captured face images:determining an eye image of an eye of the user based on the face image;extracting a to-be-verified image from the eye image of the user,wherein the to-be-verified image is a reflection of the correspondingdisplayed image in the eye of the user, and comparing the correspondingdisplayed image with the to-be-verified image to determine whether theto-be-verified image matches the corresponding displayed image;determining a quantity of matches between the to-be-verified images andthe corresponding displayed images; and performing liveness detection onthe user based on the quantity of matches.
 9. The apparatus according toclaim 8, wherein determining the eye image of the user based on the faceimage comprises: determining whether the face image contains the user'sface or reaches a clarity; and in response to determining that the faceimage contains the user's face or reaches the clarity, extracting theeye image of the user from the face image.
 10. The apparatus accordingto claim 8, wherein each displayed image comprises a first pattern, andeach to-be-verified image comprises a second pattern; and comparing thecorresponding displayed image with the to-be-verified image to determinewhether the to-be-verified image matches the corresponding displayedimage comprises: comparing characteristic information in thecorresponding displayed image and characteristic information in theto-be-verified image to determine whether the characteristic informationin the to-be-verified image matches the characteristic information inthe corresponding displayed image, wherein the characteristicinformation in the displayed image comprises a shape of the firstpattern, a size of the first pattern, a color of the first pattern, or alocation of the first pattern, and the characteristic information in theto-be-verified image comprises a shape of the second pattern, a size ofthe second pattern, a color of the second pattern, or a location of thesecond pattern.
 11. The apparatus according to claim 8, whereinsequentially displaying the plurality of images to a user comprises:sequentially displaying the plurality of images in a specified orderwithin a time.
 12. The apparatus according to claim 11, whereincapturing the plurality of face images of the user while displaying theplurality of images to the user comprises: continuously capturing theplurality of face images of the user within the time.
 13. Anon-transitory computer-readable storage medium configured withinstructions executable by one or more processors to cause the one ormore processors to perform operations comprising: sequentiallydisplaying a plurality of images to a user; capturing a plurality offace images of the user while displaying the plurality of images to theuser; for each of the captured face images: determining an eye image ofan eye of the user based on the face image, extracting a to-be-verifiedimage from the eye image of the user, wherein the to-be-verified imageis reflection of the corresponding displayed image in the eye of theuser, and comparing the corresponding displayed image with theto-be-verified image to determine whether the to-be-verified imagematches the corresponding displayed image; determining a quantity ofmatches between the to-be-verified images and the correspondingdisplayed images; and performing liveness detection on the user based onthe quantity of matches.
 14. The non-transitory computer-readablestorage medium according to claim 13, wherein determining the eye imageof the user based on the face image comprises: determining whether theface image contains the user's face or reaches a clarity; and inresponse to determining that the face image contains the user's face orreaches the clarity, extracting the eye image of the user from the faceimage.
 15. The non-transitory computer-readable storage medium accordingto claim 13, wherein each displayed image comprises a first character,and each to-be-verified image comprises a second character; andcomparing the corresponding displayed image with the to-be-verifiedimage to determine whether the to-be-verified image matches thedisplayed image comprises: comparing characteristic information in thecorresponding displayed image and characteristic information in theto-be-verified image to determine whether the characteristic informationin the to-be-verified image matches the characteristic information inthe corresponding displayed image, wherein the characteristicinformation in the corresponding displayed image comprises a size of thefirst character, a color of the first character, or a location of thefirst character, and the characteristic information in theto-be-verified image comprises a size of the second character, a colorof the second character, or a location of the second character.
 16. Thenon-transitory computer-readable storage medium according to claim 13,wherein each displayed image comprises a first pattern, and eachto-be-verified image comprises a second pattern; and comparing thecorresponding displayed image with the to-be-verified image to determinewhether the to-be-verified image matches the displayed image comprises:comparing characteristic information in the corresponding displayedimage and characteristic information in the to-be-verified image todetermine whether the characteristic information in the to-be-verifiedimage matches the characteristic information in the correspondingdisplayed image, wherein the characteristic information in thecorresponding displayed image comprises a shape of the first pattern, asize of the first pattern, a color of the first pattern, or a locationof the first pattern, and the characteristic information in theto-be-verified image comprises a shape of the second pattern, a size ofthe second pattern, a color of the second pattern, or a location of thesecond pattern.
 17. The non-transitory computer-readable storage mediumaccording to claim 13, wherein sequentially displaying the plurality ofimages to a user comprises: sequentially displaying the plurality ofimages in a specified order within a time.
 18. The non-transitorycomputer-readable storage medium according to claim 17, whereincapturing the plurality of face images of the user while displaying theplurality of images to the user comprises: continuously capturing theplurality of face images of the user within the time.